package com.beiye.drivertransport.fragment;


import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.AdapterView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.PopupWindow;
import android.widget.TextView;

import com.alibaba.fastjson.JSON;
import com.beiye.drivertransport.R;
import com.beiye.drivertransport.SubActivity.CourseSupermarketBusinessDetailsActivity;
import com.beiye.drivertransport.adapter.CourseSuperAdatper;
import com.beiye.drivertransport.adapter.PopWindowPlanApt;
import com.beiye.drivertransport.bean.CheckBean;
import com.beiye.drivertransport.bean.CourseSuperBean;
import com.beiye.drivertransport.bean.LoginUserBean;
import com.beiye.drivertransport.bean.SpecifiedLearningBusinessBean;
import com.beiye.drivertransport.http.Login;
import com.beiye.drivertransport.utils.CameraCanUseUtils;
import com.beiye.drivertransport.utils.TiShiDialog;
import com.beiye.drivertransport.utils.ToastUtil;
import com.beiye.drivertransport.utils.UserManger;
import com.beiye.drivertransport.utils.Utils;
import com.github.jdsjlzx.interfaces.OnLoadMoreListener;
import com.github.jdsjlzx.interfaces.OnRefreshListener;
import com.github.jdsjlzx.recyclerview.LRecyclerView;
import com.github.jdsjlzx.recyclerview.LRecyclerViewAdapter;

import java.util.ArrayList;
import java.util.List;


import okhttp3.Call;
import okhttp3.Response;

/**
 * A simple {@link Fragment} subclass.
 */
//单位学习课程超市
 public class CourseSupermarketCompanyFragment extends TwoBaseFgt {
 //  private PopWindowApt popWindowApt;
   private int firstIndex=1;
   private int pageSize=10;
 //  private PopupWindow mPopWindow;

   TextView tv_course;
//   @Bind(R.id.img_coursesupermarket)
//   TextView img_coursesupermarket;

   View empty_view;

   LRecyclerView lv_course;
   private LRecyclerViewAdapter lRecyclerViewAdapter1;
   private CourseSuperAdatper courseSuperAdatper;
  // ArrayList<LoginUserBean.DataBean.CurUserOrgBean> cusList = new ArrayList<>();
   private PopupWindow mPopWindowPlan;
   private PopWindowPlanApt mPopWindowPlanApt;
   ArrayList<SpecifiedLearningBusinessBean.RowsBean> planList=new ArrayList<>();


   @Override
    public int getLayoutId() {
        return R.layout.fragment_course_supermarket_company;

   }

   public void onClick(View view) {

    }
   private void initCompany() {

//      LoginUserBean userInfo = UserManger.getUserInfo();
//      LoginUserBean.DataBean data = userInfo.getData();
//      if(data==null)
//      {
//         return;
//      }
//      String userId = data.getUserId();
//      LogUtils.e("userId",userId);//6E7119CD-699B-49A2-A0B0-045D0BF7B8C0
//      List<LoginUserBean.DataBean.CurUserOrgBean> curuserOrglist = data.getCur_userOrg();
//      if(curuserOrglist.size()==0)
//      {
//         img_coursesupermarket.setVisibility(View.INVISIBLE);
//         return;
//      }
//      cusList.clear();
//      for (int i = 0; i < curuserOrglist.size(); i++) {
//         if (curuserOrglist.get(i).getMark() != 2) {
//            cusList.add(curuserOrglist.get(i));
//         }
//      }
//      String orgName = cusList.get(0).getOrgName();
//     String orgId = cusList.get(0).getOrgId();
//      int minPer = cusList.get(0).getMinPer();
//      String adId = cusList.get(0).getAdId();
//      int readInterval = cusList.get(0).getReadInterval();
//      int mark = cusList.get(0).getMark();

      String     orgName = getArguments().getString("orgName");
      String    orgId = getArguments().getString("orgId");
      String    adId = getArguments().getString("adId");
      int  minPer = getArguments().getInt("minPer");
      int  readInterval = getArguments().getInt("readInterval");
      int  mark = getArguments().getInt("Mark");
      tv_course.setText(orgName);
      //存储一份readInterval文件
      SharedPreferences sp = getActivity().getSharedPreferences("adId13",
              Context.MODE_PRIVATE);
      SharedPreferences.Editor editor = sp.edit();
      editor.putString("adId",adId);
      editor.putString("orgId",orgId);
      editor.putInt("minPer",minPer);
      editor.commit();
      //存储一份readInterval文件
      SharedPreferences spp = getActivity().getSharedPreferences("readInterval8",
              Context.MODE_PRIVATE);
      SharedPreferences.Editor editor1 = spp.edit();
      editor1.putInt("readInterval", readInterval);
      editor1.commit();
      SharedPreferences sppp = getActivity().getSharedPreferences("Mark8", Context.MODE_PRIVATE);
      SharedPreferences.Editor editor2 = sppp.edit();
      editor2.putInt("Mark", mark);
      editor2.commit();
      requestData();

//      popWindowApt = new PopWindowApt(getActivity(),cusList,R.layout.popwindow_item_layout);
//      if(popWindowApt.getCount()==1)
//      {
//         img_coursesupermarket.setVisibility(View.INVISIBLE);
//      }else{
//         img_coursesupermarket.setVisibility(View.VISIBLE);
//      }
   }
    @Override
    public void initData() {
        tv_course = (TextView) getActivity().findViewById(R.id.tv_course7);
        empty_view = (View) getActivity().findViewById(R.id.empty_view);
        lv_course = (LRecyclerView) getActivity().findViewById(R.id.lv_coursesupercompanymarket);

       //选中公司方法
       initCompany();

       initUi();
    }

//   private void showPopupWindow() {
//      //设置contentView
//      View contentView = LayoutInflater.from(getActivity()).inflate(R.layout.popwindow_layout, null);
//      mPopWindow = new PopupWindow(contentView,
//              WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT, true);
//      //设置各个控件的点击响应
//      ListView lv_company = (ListView)contentView.findViewById(R.id.lv_company);
//      lv_company.setAdapter(popWindowApt);
//      mPopWindow.showAtLocation(tv_course, Gravity.CENTER, 0, 0);
//      //  mPopWindow.setAnimationStyle(R.style.contextMenuAnim);
//      //   mPopWindow.showAsDropDown(tv_course);
//      lv_company.setOnItemClickListener(new AdapterView.OnItemClickListener() {
//         @Override
//         public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {
//            if(popWindowApt!=null)
//            {
//
//               String orgName = popWindowApt.getItem(position).getOrgName();
//               String orgId = popWindowApt.getItem(position).getOrgId();
//               String adId = popWindowApt.getItem(position).getAdId();
//               int minPer = popWindowApt.getItem(position).getMinPer();
//               int readInterval = popWindowApt.getItem(position).getReadInterval();
//               int mark = popWindowApt.getItem(position).getMark();
//               //存储一份readInterval文件
//               SharedPreferences sp = getActivity().getSharedPreferences("adId13",
//                       Context.MODE_PRIVATE);
//               SharedPreferences.Editor editor = sp.edit();
//               editor.putString("adId", adId);
//               editor.putString("orgId", orgId);
//               editor.putInt("minPer",minPer);
//               editor.commit();
//               //存储一份readInterval文件
//               SharedPreferences spp = getActivity().getSharedPreferences("readInterval8",
//                       Context.MODE_PRIVATE);
//               SharedPreferences.Editor editor1 = spp.edit();
//               editor1.putInt("readInterval", readInterval);
//               editor1.commit();
//               SharedPreferences sppp = getActivity().getSharedPreferences("Mark8", Context.MODE_PRIVATE);
//               SharedPreferences.Editor editor2 = sppp.edit();
//               editor2.putInt("Mark", mark);
//               editor2.commit();
//               mPopWindow.dismiss();
//               tv_course.setText(orgName);
//               lv_course.refresh();
//               requestData();
//
//            }
//         }
//      });
//   }

    @Override
    public void requestData() {

       //存储一份orgId文件
       SharedPreferences spp = getActivity().getSharedPreferences("adId13",
               Context.MODE_PRIVATE);
       String  adId = spp.getString("adId","");
       if(adId.equals(""))
       {
          lv_course.setEmptyView(empty_view);
          lv_course.refreshComplete(0);
          return;
       }
       new Login().getcomanycoursesupermaket(1,adId,3,firstIndex,pageSize,this,1);

    }
   @Override
   public void onSuccess(String result, Call call, Response response, int what) {
      if(what==1)
      {
         CourseSuperBean courseSuperBean = JSON.parseObject(result, CourseSuperBean.class);
         if (courseSuperBean!= null) {
            try {
//                    if( courseSuperBean.getRows().size()==0)
//                    {
//                        courseSuperAdatper.clear();
//                        lv_course.setEmptyView(empty_view);
//                        lv_course.refreshComplete(0);
//                        return;
//                    }
               if (courseSuperBean.getRows()!= null && courseSuperBean.getRows().size() > 0) {
                  lv_course.setVisibility(View.VISIBLE);
                  if (firstIndex == 1) {
                     courseSuperAdatper.clear();
                     courseSuperAdatper.setDataList(courseSuperBean.getRows());
                  } else {
                     courseSuperAdatper.addAll(courseSuperBean.getRows());
                  }

                  if(courseSuperBean.getRows().size()<pageSize){
                     lv_course.setNoMore(true);
                  }
               } else {
                  if (firstIndex == 1) {//第一页
                     lv_course.setEmptyView(empty_view);
                     courseSuperAdatper.clear();
                  } else {
                     lv_course.setNoMore(true);
                  }
               }
            } catch (Exception e) {
               e.printStackTrace();
            }
            lv_course.refreshComplete(courseSuperBean.getRows() == null ? 0 : courseSuperBean.getRows().size());
            lRecyclerViewAdapter1.notifyDataSetChanged();
         }
      }else if (what == 2) {
         CheckBean checkBean = JSON.parseObject(result, CheckBean.class);
         int code = checkBean.getCode();
         String msg = checkBean.getMsg();
         if (code == 0) {

            initcoursesupermaketCheckData();

         }


      }
      else if (what == 3) {

         CheckBean checkBean = JSON.parseObject(result, CheckBean.class);
         int code = checkBean.getCode();
         String msg = checkBean.getMsg();
         if (code == 0) {

            initcoursesupermaketCheckDateData();//判断是否未完成学习计划
         }
      }else if(what==4)
      {
         SpecifiedLearningBusinessBean specifiedLearningBusinessBean = JSON.parseObject(result, SpecifiedLearningBusinessBean.class);
         List<SpecifiedLearningBusinessBean.RowsBean> rows = specifiedLearningBusinessBean.getRows();
         if(rows.size()==0)
         {
            if(!CameraCanUseUtils.isCameraCanUse()) {
               ToastUtil.showShortToast(getActivity(),"请到手机设置界面里找驾运宝允许开启照相");
               return;
            }
            TiShiDialog.Builder builder = new TiShiDialog.Builder(getContext());
            builder.setMessage("您已完成本月学习任务，继续浏览课程将不记录学时");
            builder.setTitle("提示:");
            builder.setPositiveButton("继续", new DialogInterface.OnClickListener() {
               public void onClick(DialogInterface dialog, int which) {
                  dialog.dismiss();
                  //设置你的操作事项
                  //存储一份readInterval文件
                  showLoadingDialog("正在加载");
                  //存储一份readInterval文件
                  SharedPreferences spp = getActivity().getSharedPreferences("courseSupermarktcSn3",
                          Context.MODE_PRIVATE);
                  int tcSn = spp.getInt("tcSn", 0);
                  Bundle bundle = new Bundle();
                  bundle.putInt("tcsn", tcSn);
                  SharedPreferences sp = getActivity().getSharedPreferences("readInterval8",
                          Context.MODE_PRIVATE);
                  int readInterval = sp.getInt("readInterval", 0);
                  bundle.putInt("readInterval", readInterval);
                  //存储一份orgId文件
                  SharedPreferences sppp = getActivity().getSharedPreferences("adId13",
                          Context.MODE_PRIVATE);
                  String orgId = sppp.getString("orgId", "");
                  int minPer = sppp.getInt("minPer", 0);
                  bundle.putString("orgId", orgId);
                  bundle.putInt("minPer",minPer);
                  bundle.putInt("atpSn",-1);
                  startActivity(CourseSupermarketBusinessDetailsActivity.class, bundle);
               }
            });

            builder.setNegativeButton("取消",
                    new android.content.DialogInterface.OnClickListener() {
                       public void onClick(DialogInterface dialog, int which) {
                          dialog.dismiss();
                       }
                    });

            builder.create().show();

         }else{

            planList.clear();
            for (int i = 0 ; i < rows.size(); i++) {
               if(rows.get(i).getFinishMark()==0)
               {
                  planList.add(rows.get(i));
               }
            }

            mPopWindowPlanApt = new PopWindowPlanApt(getContext(),planList,R.layout.popwindow_dateitem_layout);
            showPopupWindowDate(planList);//弹出未完成时
         }

      }



      super.onSuccess(result, call, response, what);


   }
   private void showPopupWindowDate(List<SpecifiedLearningBusinessBean.RowsBean> rows) {

      //设置contentView
      View contentView = LayoutInflater.from(getContext()).inflate(R.layout.popwindowlearnplan_layout, null);
      mPopWindowPlan = new PopupWindow(contentView,
              WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT, true);
      //设置各个控件的点击响应
      LinearLayout view_parent =(LinearLayout) contentView.findViewById(R.id.checkdate_le);
      ListView lv_date = (ListView) contentView.findViewById(R.id.lv_date);
      TextView tv_more = (TextView) contentView.findViewById(R.id.tv_checkdate2);
      TextView tv_back = (TextView) contentView.findViewById(R.id.tv_checkdate4);
      tv_back.setOnClickListener(new View.OnClickListener() {
         @Override
         public void onClick(View view) {
            mPopWindowPlan.dismiss();
         }
      });
      TextView tv_nocheckdate = (TextView) contentView.findViewById(R.id.tv_checkdate3);

      tv_nocheckdate.setOnClickListener(new View.OnClickListener() {
         @Override
         public void onClick(View view) {

            if (!CameraCanUseUtils.isCameraCanUse()) {
               ToastUtil.showShortToast(getActivity(), "请到手机设置界面里找驾运宝允许开启照相");
               return;
            }

            showLoadingDialog("正在加载");
            //存储一份readInterval文件
            SharedPreferences spp = getActivity().getSharedPreferences("courseSupermarktcSn3",
                    Context.MODE_PRIVATE);
            int tcSn = spp.getInt("tcSn", 0);
            Bundle bundle = new Bundle();
            bundle.putInt("tcsn", tcSn);
            SharedPreferences sp = getActivity().getSharedPreferences("readInterval8",
                    Context.MODE_PRIVATE);
            int readInterval = sp.getInt("readInterval", 0);
            bundle.putInt("readInterval", readInterval);
            //存储一份orgId文件
            SharedPreferences sppp = getActivity().getSharedPreferences("adId13",
                    Context.MODE_PRIVATE);
            String orgId = sppp.getString("orgId", "");
            int minPer = sppp.getInt("minPer", 0);
            bundle.putString("orgId", orgId);
            bundle.putInt("minPer", minPer);
            bundle.putInt("atpSn",-1);
            startActivity(CourseSupermarketBusinessDetailsActivity.class, bundle);
            mPopWindowPlan.dismiss();
         }
      });
      mPopWindowPlan.showAtLocation(view_parent, Gravity.CENTER, 0, 0);
      if(rows.size()>=3)
      {
         View listItem  = mPopWindowPlanApt.getView(0, null, lv_date);
         listItem.measure(0, 0);
         int totalHei = (listItem.getMeasuredHeight()+lv_date.getDividerHeight() ) * 3;
         lv_date.getLayoutParams().height = totalHei;
         lv_date.setAdapter(mPopWindowPlanApt);
         tv_more.setVisibility(View.VISIBLE);
      }else{
         lv_date.setAdapter(mPopWindowPlanApt);
         tv_more.setVisibility(View.INVISIBLE);
      }

      lv_date.setOnItemClickListener(new AdapterView.OnItemClickListener() {
         @Override
         public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {
            showLoadingDialog("正在加载");
            int atpSn = mPopWindowPlanApt.getItem(position).getSn();
            //存储一份readInterval文件
            SharedPreferences spp = getActivity().getSharedPreferences("courseSupermarktcSn3",
                    Context.MODE_PRIVATE);
            int tcSn = spp.getInt("tcSn", 0);
            SharedPreferences sp = getActivity().getSharedPreferences("readInterval8",
                    Context.MODE_PRIVATE);
            int readInterval = sp.getInt("readInterval", 0);
            //存储一份orgId文件
            SharedPreferences sppp = getActivity().getSharedPreferences("adId13",
                    Context.MODE_PRIVATE);
            String orgId = sppp.getString("orgId", "");
            int minPer = sppp.getInt("minPer", 0);
            Bundle bundle = new Bundle();
            bundle.putInt("tcsn", tcSn);
            bundle.putInt("readInterval", readInterval);
            bundle.putString("orgId", orgId);
            bundle.putInt("minPer", minPer);
            bundle.putInt("atpSn", atpSn);
            startActivity(CourseSupermarketBusinessDetailsActivity.class, bundle);
            mPopWindowPlan.dismiss();

         }
      });

   }
   private void initcoursesupermaketCheckDateData() {

      //存储一份orgId文件
      SharedPreferences spp = getActivity().getSharedPreferences("adId13",
              Context.MODE_PRIVATE);
      String  orgId = spp.getString("orgId","");
      LoginUserBean userInfo = UserManger.getUserInfo();
      LoginUserBean.DataBean data = userInfo.getData();
      if(data==null)
      {
         return;
      }
      String userId = data.getUserId();
      new Login().getSpecifiedBusinessLearning(orgId, userId, 1, 0, 1, 1000, this, 4);
      //   new Login().getcoursesupermaketCheckDate(userId,orgId,this,4);

   }
   @Override
   public void onError(String result, Call call, Response response, int what) {
      if (what == 2) {
         CheckBean checkBean = JSON.parseObject(result, CheckBean.class);
         int code = checkBean.getCode();
         if(code==2813)
         {
            String msg = checkBean.getMsg();
            TiShiDialog.Builder builder1 = new TiShiDialog.Builder(getContext());
            builder1.setMessage(msg);
            builder1.setTitle("提示:");
            builder1.setPositiveButton("我知道", new DialogInterface.OnClickListener() {
               public void onClick(DialogInterface dialog, int which) {
                  dialog.dismiss();;
                  //设置你的操作事项
               }
            });
            builder1.create().show();

         }else  if(code==1824)
         {
            String msg = checkBean.getMsg();
            TiShiDialog.Builder builder1 = new TiShiDialog.Builder(getContext());
            builder1.setMessage(msg);
            builder1.setTitle("提示:");
            builder1.setPositiveButton("我知道", new DialogInterface.OnClickListener() {
               public void onClick(DialogInterface dialog, int which) {
                  dialog.dismiss();;
                  //设置你的操作事项
               }
            });
            builder1.create().show();

         }
      }
      else if (what == 3) {

         CheckBean checkBean = JSON.parseObject(result, CheckBean.class);
         int code = checkBean.getCode();
         if (code == 1812) {
            String msg = checkBean.getMsg();
            TiShiDialog.Builder builder1 = new TiShiDialog.Builder(getContext());
            builder1.setMessage(msg);
            builder1.setTitle("提示:");
            builder1.setPositiveButton("我知道", new DialogInterface.OnClickListener() {
               public void onClick(DialogInterface dialog, int which) {
                  dialog.dismiss();
                  ;
                  //设置你的操作事项
               }
            });
            builder1.create().show();
         }
      }
      super.onError(result, call, response, what);
   }

    @Override
    public void onUserVisible() {
       lv_course.refresh();
       requestData();
    }
   private void initUi() {
      LinearLayoutManager ms = new LinearLayoutManager(getActivity());
      ms.setOrientation(LinearLayoutManager.VERTICAL);
      lv_course.setLayoutManager(ms);
      courseSuperAdatper = new CourseSuperAdatper(getContext());
      lRecyclerViewAdapter1 = new LRecyclerViewAdapter(courseSuperAdatper);
      lv_course.setAdapter(lRecyclerViewAdapter1);
      lv_course.setFooterViewColor(R.color.colorAccent, R.color.dark ,android.R.color.white);
      lv_course.setFooterViewHint("拼命加载中","已经全部为你呈现了","网络不给力啊，点击再试一次吧");
      lv_course.setOnRefreshListener(new OnRefreshListener() {

         @Override
         public void onRefresh() {
            firstIndex = 1;
            requestData();
         }
      });

      lv_course.setOnLoadMoreListener(new OnLoadMoreListener() {

         @Override
         public void onLoadMore() {
            firstIndex+=pageSize;
            requestData();
         }
      });
      empty_view.setOnClickListener(new View.OnClickListener() {
         @Override
         public void onClick(View v) {
            lv_course.refresh();
         }
      });

      lRecyclerViewAdapter1.setOnItemClickListener(new com.github.jdsjlzx.interfaces.OnItemClickListener() {
         @Override
         public void onItemClick(View view, int position) {
            if (Utils.isFastDoubleClick()) {
               return ;
            }
            try {
               SharedPreferences sp1 = getActivity().getSharedPreferences("Mark8", Context.MODE_PRIVATE);
               int mark = sp1.getInt("Mark", 1);
               if(mark==0)
               {
                  TiShiDialog.Builder builder1 = new TiShiDialog.Builder(getActivity());
                  builder1.setMessage("您已被企业管理员禁用,请联系企业管理员");
                  builder1.setTitle("提示:");
                  builder1.setPositiveButton("我知道", new DialogInterface.OnClickListener() {
                     public void onClick(DialogInterface dialog, int which) {
                        dialog.dismiss();
                        //设置你的操作事项
                     }
                  });
                  builder1.create().show();
                  return;
               }
               //校验是否学过课程
               int tcSn = courseSuperAdatper.getDataList().get(position).getTcSn();
               //存储一份tcSn文件
               SharedPreferences sp = getActivity().getSharedPreferences("courseSupermarktcSn3",
                       Context.MODE_PRIVATE);
               SharedPreferences.Editor editor = sp.edit();
               editor.putInt("tcSn", tcSn);
               editor.commit();
               initspeciacoursesupermaketCheckData();

            } catch (Exception e) {
               e.printStackTrace();
            }
         }
      });
      lv_course.refresh();

   }
   //校验指定学习是否学过
   private void initspeciacoursesupermaketCheckData() {
      LoginUserBean userInfo = UserManger.getUserInfo();
      LoginUserBean.DataBean data = userInfo.getData();
      if(data==null)
      {
         return;
      }
      String userId =data.getUserId();
      //存储一份orgId文件
      SharedPreferences sp = getActivity().getSharedPreferences("adId13",
              Context.MODE_PRIVATE);
      String orgId = sp.getString("orgId", "");
      new Login().getlearncoursesupermaketBusinessCheck(userId,orgId,3, this, 2);
   }
       //校验课程超市课程是否学过
   private void initcoursesupermaketCheckData() {
      LoginUserBean userInfo = UserManger.getUserInfo();
      LoginUserBean.DataBean data = userInfo.getData();
      if(data==null)
      {
         return;
      }
      String userId = data.getUserId();
      //存储一份readInterval文件
      SharedPreferences sp = getActivity().getSharedPreferences("readInterval8",
              Context.MODE_PRIVATE);
      int readInterval = sp.getInt("readInterval", 0);
      //存储一份readInterval文件
      SharedPreferences spp = getActivity().getSharedPreferences("courseSupermarktcSn3",
              Context.MODE_PRIVATE);
      int tcSn = spp.getInt("tcSn", 0);
      //存储一份orgId文件
      SharedPreferences sppp = getActivity().getSharedPreferences("adId13",
              Context.MODE_PRIVATE);
      String orgId = sppp.getString("orgId", "");
//        dialog = CustomProgressDialog.show(getContext(), "", true, null);
      new Login().getPreJobTrainingandcoursesupermaketCheck(userId,orgId,tcSn, readInterval, this, 3);

   }
    @Override
    public boolean onTouch(View view, MotionEvent motionEvent) {
        return false;
    }
}
